home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / comm / pf270.zip / COMMTEST.BAT < prev    next >
DOS Batch File  |  1992-03-17  |  6KB  |  127 lines

  1. @echo off
  2. rem 
  3. rem +-----------------------------------------+
  4. rem !   Port Finder ERRORLEVEL Batch File     !
  5. rem !   Copyright (c) 1990 mcTRONic Systems   !
  6. rem !   revised on: August 4, 1990            !
  7. rem !   File Name: COMMTEST.BAT               !
  8. rem +-----------------------------------------+
  9. rem 
  10. if not exist pf.com goto :error
  11. cls
  12. echo    ╔═══════════════════════════════════════════════════════════════════════╗
  13. echo    ║                                                                       ║
  14. echo    ║  ▒▒▒▒▄  ▒▒▒▒▄  ▒▒▒▒▄  ▒▒▒▒▒▄    ▒▒▒▒▄ ▒▒▒▄ ▒▒▄ ▒▄ ▒▒▒▒▄  ▒▒▒▒▄ ▒▒▒▒▄  ║
  15. echo    ║  ▒█▀▒█  ▒█▀▒█  ▒█▀▒█   ▀▒█▀▀    ▒█▀▀▀  ▒█▀ ▒█▒▄▒█ ▒█▀▀▒▄ ▒█▀▀▀ ▒█▀▒█  ║
  16. echo    ║  ▒▒▒▒█  ▒█ ▒█  ▒▒▒▄▀    ▒█      ▒▒▒▄   ▒█  ▒█▒█▒█ ▒█  ▒█ ▒█▀▀  ▒▒▒▄▀  ║
  17. echo    ║  ▒█▀▀▀  ▒▒▒▒█  ▒█▀▒▄    ▒█      ▒█▀▀  ▒▒▒▄ ▒█ ▒▒█ ▒▒▒▒▄▀ ▒▒▒▒▄ ▒█▀▒▄  ║
  18. echo    ║   ▀      ▀▀▀▀   ▀  ▀     ▀       ▀     ▀▀▀  ▀  ▀▀  ▀▀▀▀   ▀▀▀▀  ▀  ▀  ║
  19. echo    ║                                                                       ║
  20. echo    ║           The Number ONE Shareware COM and LPT Port Utility           ║
  21. echo    ║                                                                       ║
  22. echo    ╠═══════════════════════════════════════════════════════════════════════╣
  23. echo    ║                                                                       ║
  24. echo    ║   You can use  Port Finder  in a batch file to determine the number   ║
  25. echo    ║   of COM ports that are installed in any IBM or compatible computer.  ║
  26. echo    ║   Press any key to see the COM ports installed in your computer.      ║
  27. echo    ║                                                                       ║
  28. echo    ╚═══════════════════════════════════════════════════════════════════════╝
  29. pause
  30. cls
  31. pf %1 %2 >nul
  32. echo    ╔═══════════════════════════════════════════════════════════════════════╗
  33. echo    ║                                                                       ║
  34. echo    ║  ▒▒▒▒▄  ▒▒▒▒▄  ▒▒▒▒▄  ▒▒▒▒▒▄    ▒▒▒▒▄ ▒▒▒▄ ▒▒▄ ▒▄ ▒▒▒▒▄  ▒▒▒▒▄ ▒▒▒▒▄  ║
  35. echo    ║  ▒█▀▒█  ▒█▀▒█  ▒█▀▒█   ▀▒█▀▀    ▒█▀▀▀  ▒█▀ ▒█▒▄▒█ ▒█▀▀▒▄ ▒█▀▀▀ ▒█▀▒█  ║
  36. echo    ║  ▒▒▒▒█  ▒█ ▒█  ▒▒▒▄▀    ▒█      ▒▒▒▄   ▒█  ▒█▒█▒█ ▒█  ▒█ ▒█▀▀  ▒▒▒▄▀  ║
  37. echo    ║  ▒█▀▀▀  ▒▒▒▒█  ▒█▀▒▄    ▒█      ▒█▀▀  ▒▒▒▄ ▒█ ▒▒█ ▒▒▒▒▄▀ ▒▒▒▒▄ ▒█▀▒▄  ║
  38. echo    ║   ▀      ▀▀▀▀   ▀  ▀     ▀       ▀     ▀▀▀  ▀  ▀▀  ▀▀▀▀   ▀▀▀▀  ▀  ▀  ║
  39. echo    ║                                                                       ║
  40. echo    ║           The Number ONE Shareware COM and LPT Port Utility           ║
  41. echo    ║                                                                       ║
  42. echo    ╠═══════════════════════════════════════════════════════════════════════╣
  43. echo    ║                                                                       ║
  44. if errorlevel 15 goto 15port
  45. if errorlevel 14 goto 14port
  46. if errorlevel 13 goto 13port
  47. if errorlevel 12 goto 12port
  48. if errorlevel 11 goto 11port
  49. if errorlevel 10 goto 10port
  50. if errorlevel 9 goto 9port
  51. if errorlevel 8 goto 8port
  52. if errorlevel 7 goto 7port
  53. if errorlevel 6 goto 6port
  54. if errorlevel 5 goto 5port
  55. if errorlevel 4 goto 4port
  56. if errorlevel 3 goto 3port
  57. if errorlevel 2 goto 2port
  58. if errorlevel 1 goto 1port
  59. if errorlevel 0 goto 0port
  60. :0port
  61. echo    ║                         You have no COM ports!                        ║
  62. goto endall
  63. :1port
  64. echo    ║                          You have COM port 1                          ║
  65. goto endall
  66. :2port
  67. echo    ║                          You have COM port 2                          ║
  68. goto endall
  69. :3port
  70. echo    ║                       You have COM ports 1 and 2                      ║
  71. goto endall
  72. :4port
  73. echo    ║                          You have COM port 3                          ║
  74. goto endall
  75. :5port
  76. echo    ║                       You have COM ports 1 and 3                      ║
  77. goto endall
  78. :6port
  79. echo    ║                       You have COM ports 2 and 3                      ║
  80. goto endall
  81. :7port
  82. echo    ║                     You have COM ports 1, 2, and 3                    ║
  83. goto endall
  84. :8port
  85. echo    ║                          You have COM port 4                          ║
  86. goto endall
  87. :9port
  88. echo    ║                       You have COM ports 1 and 4                      ║
  89. goto endall
  90. :10port
  91. echo    ║                       You have COM ports 2 and 4                      ║
  92. goto endall
  93. :11port
  94. echo    ║                     You have COM ports 1, 2, and 4                    ║
  95. goto endall
  96. :12port
  97. echo    ║                       You have COM ports 3 and 4                      ║
  98. goto endall
  99. :13port
  100. echo    ║                     You have COM ports 1, 3, and 4                    ║
  101. goto endall
  102. :14port
  103. echo    ║                     You have COM ports 2, 3, and 4                    ║
  104. goto endall
  105. :15port
  106. echo    ║                    You have COM ports 1, 2, 3, and 4                  ║
  107. :endall
  108. echo    ║                                                                       ║
  109. echo    ╠═══════════════════════════════════════════════════════════════════════╣
  110. echo    ║                                                                       ║
  111. echo    ║   To see how this batch file works,  enter the following command at   ║
  112. echo    ║   the DOS prompt "type commtest.bat |more" or to print it out enter   ║
  113. echo    ║   "type commtest.bat >prn".   Thank You, for  using   Port Finder !   ║
  114. echo    ║                                                                       ║
  115. echo    ╚═══════════════════════════════════════════════════════════════════════╝
  116. goto :end
  117. :error
  118. cls
  119. echo    ╔═════════════════════════════════════════════════════════╗
  120. echo    ║                                                         ║
  121. echo    ║  The file PF.COM must be in the same default directory  ║
  122. echo    ║  as COMMTEST.BAT.  Please have these two files in the   ║
  123. echo    ║  same default directory before running COMMTEST.BAT.    ║
  124. echo    ║                                                         ║
  125. echo    ╚═════════════════════════════════════════════════════════╝
  126. :end
  127.